
<?php
ob_start();
session_start();
if(isset($_POST["name"])&&isset($_POST["password"])){
	$name=$_POST["name"];
	$password=$_POST["password"];////
	$pass=md5($password);
	include '../consql/consql.php';
	include 'pre.php';
	$tableuser=$pre . "user";
	
	$cmd=mysql_query("select * from $tableuser where name='$name' and password='$pass'");
	echo $tableuser;
	if($row=mysql_fetch_array($cmd)){
		$_SESSION["user"]=$name;
		header("location:index.php");
		exit;
	}else{
		echo '<center>登录失败！请检查用户名或密码。</center>';
		exit;
	}
}



?>
<html >
<head>
<title>RJblog-登陆</title> 

<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<script type="text/javascript" src="js/jquery-1.9.0.min.js"></script>

<link href="css/login2.css" rel="stylesheet" type="text/css" />
</head>
<body>
<h1>登陆<sup>RJblog</sup></h1>

<div class="login" style="margin-top:50px;">
    
    <div class="header">
        <div class="switch" id="switch"><a class="switch_btn_focus" id="switch_qlogin" href="javascript:void(0);" tabindex="7">快速登录</a>
			<a class="switch_btn" id="switch_login" href="javascript:void(0);" tabindex="8">找回密码</a><div class="switch_bottom" id="switch_bottom" style="position: absolute; width: 64px; left: 0px;"></div>
        </div>
    </div>    
  
    
    <div class="web_qr_login" id="web_qr_login" style="display: block; height: 235px;">    
<!--做了部分UI优化-->
            <!--登录-->
            <div class="web_login" id="web_login">
               
               
               <div class="login-box">
    
            
			<div class="login_form">
			<form action="" method="post">
               
                <div class="uinArea" id="uinArea">
                <label class="input-tips" for="u" type="text" name="name">账户：</label>
                <div class="inputOuter" id="uArea">
                    
                    <input type="text" id="u" name="name" class="inputstyle"/>
                </div>
                </div>
                <div class="pwdArea" id="pwdArea">
               <label class="input-tips"  for="p" type="password" name="password">密码：</label> 
               <div class="inputOuter" id="pArea">
                    
                    <input type="password" id="p" name="password" class="inputstyle"/>
                </div>
                </div>
               
                <div style="padding-left:50px;margin-top:20px;">
				<input type="submit" value="登 录" style="width:150px;" class="button_blue"/></div>
              </form>
           </div>
           
            	</div>
               
            </div>
			
            <!--登录end-->
  </div>


</div>
<div class="jianyi">*推荐使用Chrome内核浏览器访问本站</div>
</body>
</html>